package com.gaogzhen.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gaogzhen.mapper.UserAuthAuditRecordMapper;
import com.gaogzhen.domain.UserAuthAuditRecord;
import com.gaogzhen.service.UserAuthAuditRecordService;
/**
* @description ${description}
* @author Administrator
* @date 2022-06-07 11:46
* @version 1.0
*/
@Service
public class UserAuthAuditRecordServiceImpl extends ServiceImpl<UserAuthAuditRecordMapper, UserAuthAuditRecord> implements UserAuthAuditRecordService{

    @Override
    public List<UserAuthAuditRecord> getList(Long id) {
        return list(Wrappers.lambdaQuery(UserAuthAuditRecord.class)
                .eq(UserAuthAuditRecord::getUserId, id)
                .orderByDesc(UserAuthAuditRecord::getCreated)
                .last("limit 3")
        );
    }
}
